package com.rms.hkpc.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.rms.hkpc.R;
import com.rms.hkpc.adapter.base.BaseAdapter;
import com.rms.hkpc.adapter.base.BaseViewHolder;
import com.rms.hkpc.db.dto.RecordsRemarksDto;

import java.util.List;

public class RecordsRemarkAdapter extends BaseAdapter<RecordsRemarksDto> {

    private TextView tv;

    public RecordsRemarkAdapter(Context context, List<RecordsRemarksDto> mDatas, int layoutId) {
        super(context, mDatas, layoutId);
    }

    @Override
    public void convert(BaseViewHolder holder, RecordsRemarksDto item, final int position) {
        tv = holder.fd(R.id.tv_show);
        tv.setText(item.getRemark() == null?"":item.getRemark());
        if (onItemLongClickListener != null) {
            tv.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    onItemLongClickListener.onItemLongClickListener(v, position);
                    return false;
                }
            });
        }

    }
}
